DECLARE SUB CenterText ()
DECLARE SUB DissolveScreen ()
DECLARE SUB HitAnyKey ()
'$INCLUDE: 'c:\bc7\programs\yoshi\global.bi'

SUB DissolveScreen
    DIM ScreenPos%(2000)
    FOR X% = 1 TO 2000
        ScreenPos%(X%) = X%
    NEXT X%

    FOR X% = 1 TO 2000
        SWAP ScreenPos%(X%), ScreenPos%(INT(RND(1) * 2000) + 1)
    NEXT X%

    FOR X% = 1 TO 2000
        R% = ScreenPos%(X%) \ 80 + 1
        IF R% = 0 THEN R% = 1
        IF R% > 25 THEN R% = 25
        C% = ABS(ScreenPos%(X%) - (80 * R%))
        IF C% = 0 THEN C% = 1
        LOCATE R%, C%
        PRINT " ";
    NEXT X%

    LOCATE 1, 80: PRINT " ";   ' cheap temporary fix
END SUB

SUB Endgame

CrappyEnding:
  finish = TIMER
  IF stench = 0 THEN GOTO OkayEnding
  CLS
  PRINT "  The party has started, and you have a present for Yoshi!  You go"
  PRINT "downstairs with your present.  It's not wrapped, but that's okay.  The"
  PRINT "pile of presents is more of a mountain and the birthday cake is three layers!"
  PRINT "As soon as you enter the room, everyone turns to look at you with a strange"
  PRINT "look.  You stop and think for a second, and then are mortified to realize"
  PRINT "that you still smell to high heaven like a putrid sewer.  You are prompty"
  PRINT "asked to leave the party, and you never have a chance to give Yoshi the"
  PRINT "present you worked so hard to get.  Yoshi and his friends never speak to you"
  PRINT "again, and no one ever wants to be your friend after hearing about the way"
  PRINT "you smelled."
  PRINT
  PRINT "  You grow up friendless, sad, and dejected.  You never have anyone that cares"
  PRINT "for you except for your mom, but that's her job.  You eventually turn to"
  PRINT "hard liquor for comfort.  Soon enough, you have a bunch of new friends, and"
  PRINT "not a single one of them is imaginary or a hallucination.  They're the"
  PRINT "members of your Alcoholics Anonymous group."
  PRINT
  HitAnyKey
  time = finish - start: time = INT(time / 60)
  PRINT "You took"; time;
  IF time < 2 THEN PRINT "minute to win this game."
  IF time > 1 THEN PRINT "minutes to win this game."
  IF Graphics = 1 THEN PRINT "Par: 10 minutes" ELSE PRINT "Par: 5 minutes"
  HitAnyKey
  GOTO Credits

OkayEnding:
  IF birthdaycard = 1 THEN GOTO GoodEnding
  CLS
  PRINT "  The birthday party has started, and you got here just in time.  You go"
  PRINT "downstairs with your present (unwrapped, of course) and sit among the crowd"
  PRINT "that has been invited to the joyous occasion.  Yoshi comes out, and everyone"
  PRINT "sings the traditional 'Happy Birthday' song.  He opens his many presents, but"
  PRINT "is confused when he comes to yours.  'Who is this from?' he asks.  You raise"
  PRINT "your hand and he smiles.  'Thanks!  It's exactly what I wanted!  I hope that"
  PRINT "it wasn't any trouble to get.'  You just grimace."
  PRINT
  PRINT "  The party goes smoothly, and frankly you're just glad that the zombies were"
  PRINT "not invited.  Yoshi's cake is four layers high, and his mother almost drops"
  PRINT "it while bringing it out.  You eat cake, punch, and even some of that"
  PRINT "yummy ice cream that was promised to you.  You have a great time, and go"
  PRINT "home with a bag of party favors."
  PRINT
  PRINT "  When you get home, your mother smiles at you and then looks at your shoes."
  PRINT "'What happened to your shoes?' she cries.  You look down and realize that"
  PRINT "they are still crusted with sewer gook, ruining them.  Dang it, and they were"
  PRINT "perfectly good Nike Airs, too.  Well, everything can't go well in a day."
  PRINT
  HitAnyKey
  time = finish - start: time = INT(time / 60)
  PRINT "You took"; time;
  IF time < 2 THEN PRINT "minute to win this game."
  IF time > 1 THEN PRINT "minutes to win this game."
  IF Graphics = 1 THEN PRINT "Par: 10 minutes" ELSE PRINT "Par: 5 minutes"
  HitAnyKey
  GOTO Credits

GoodEnding:
  CLS
  PRINT "  You walk into Yoshi's room and find him sitting there ready for his party."
  PRINT "The two of you walk downstairs together, you briefly telling him about your"
  PRINT "'terrible struggle' with the rabid sewer badgers and the 'evil, dominating"
  PRINT "FBI agents' that 'tried to throw you into jail.'  His eyes open wide in"
  PRINT "admiration of your exploits, especially since you did it all for him."
  PRINT
  PRINT "  The party goes well, and when the time comes to sing the traditional song"
  PRINT "of 'Happy Birthday,' the cake is brought in, ablaze with candles.  The cake"
  PRINT "is five layers high!  Yoshi's mother has trouble keeping her balance"
  PRINT "underneath the heavy load.  Everyone devours the massive cake in minutes,"
  PRINT "washing it down with party punch and following that with big bowls of"
  PRINT "vanilla ice cream.  Mm, mm.  Your favorite!"
  PRINT
  PRINT "  When it comes time to open presents, yours is, purely by chance, left until"
  PRINT "last.  The others are boring things like money and Legos and Power Rangers"
  PRINT "action figures.  When Yoshi picks up the (unwrapped) package of craft"
  PRINT "popsicle sticks, his eyes glow.  He opens the card you got (found) for him"
  PRINT "and reads what you had hurriedly scribbled in there just before the party"
  PRINT "began.  His eyes tear up, and he barely supresses a sniffle.  He looks over"
  PRINT "at you and smiles.  'Thank you.  Thank you for everything!'"
  PRINT
  HitAnyKey
  time = finish - start: time = INT(time / 60)
  PRINT "You took"; time;
  IF time < 2 THEN PRINT "minute to win this game."
  IF time > 1 THEN PRINT "minutes to win this game."
  IF Graphics = 1 THEN PRINT "Par: 10 minutes" ELSE PRINT "Par: 5 minutes"
  HitAnyKey

Credits:
  CLS
  COLOR 11, 0, 9
  PRINT
  PRINT TAB(35); "CREDITS:"
  PRINT
  PRINT "  Idea Conception: ";
  COLOR 15, 0, 9
  PRINT "Chris Kugler"
  PRINT "                   Kenneth Capaul"
  PRINT
  COLOR 11, 0, 9
  PRINT "      Programming: ";
  COLOR 15, 0, 9
  PRINT "Chris Kugler"
  PRINT "                   Chris Walker"
  PRINT
  COLOR 11, 0, 9
  PRINT "     Play Testing: ";
  COLOR 15, 0, 9
  PRINT "Chris Kugler"
  PRINT "                   Stuart Jansen"
  PRINT "                   Evan Posner"
  PRINT
  COLOR 11, 0, 9
  PRINT "    Moral Support: ";
  COLOR 15, 0, 9
  PRINT "Ryan Stokes"
  PRINT "                   Eddie Van Halen"
  PRINT
  COLOR 11, 0, 9
  PRINT "     Offical Song: ";
  COLOR 15, 0, 9
  PRINT "'Wasted Years' by Die Toten Hosen"
  PRINT
  COLOR 11, 0, 9
  PRINT "Special Thanks To: ";
  COLOR 15, 0, 9
  PRINT "The Dead Kennedys"
  PRINT "                   Orson Scott Card"
  PRINT "                   Jim Davis"
  PRINT "                   Andrew Keane"
  HitAnyKey
  CLS
  COLOR 20, 0, 4
  PRINT
  PRINT
  Text = "DISLAIMER!": CenterText
  COLOR 7, 0, 8
  PRINT
  PRINT
  PRINT
  PRINT
  PRINT
  PRINT
  Text = "Please note that the author does not endorse violence of any type": CenterText
  Text = "(so put that gun down).": CenterText
  HitAnyKey
  CLS
  PRINT
  PRINT
  PRINT
  COLOR 15, 0, 9
  PRINT
  PRINT
  PRINT
  Text = "***** THE END *****": CenterText
  COLOR 14, 0, 4
  Text = "*****************": CenterText
  COLOR 10, 0, 9
  Text = "***************": CenterText
  COLOR 11, 0, 9
  Text = "*************": CenterText
  COLOR 2, 0, 9
  Text = "***********": CenterText
  COLOR 3, 0, 9
  Text = "*********": CenterText
  COLOR 12, 0, 9
  Text = "*******": CenterText
  COLOR 4, 0, 9
  Text = "*****": CenterText
  COLOR 9, 0, 9
  Text = "***": CenterText
  COLOR 1, 0, 9
  Text = "*": CenterText
  COLOR 7, 0, 8
  HitAnyKey
  DissolveScreen
  END
END SUB

